﻿<UserControl
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:OMANE.Modules.PMT" x:Class="ViewNewPMTWizardParamGen" 
             mc:Ignorable="d">
	<d:UserControl.DataContext>
		<local:ViewModelNewPMTWizardPageParamGen/>
	</d:UserControl.DataContext>
    <UserControl.Resources>
    	<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter"/>
        <DataTemplate DataType="{x:Type local:ViewModelDirectoryPMT}">
            <local:ViewIFichierPMT/>
        </DataTemplate>
        <BorderGapMaskConverter x:Key="BorderGapMaskConverter"/>
        <Style x:Key="GroupBoxStyleDefNveauPMT" TargetType="{x:Type GroupBox}">
        	<Setter Property="BorderBrush" Value="#D5DFE5"/>
        	<Setter Property="BorderThickness" Value="1"/>
        	<Setter Property="Template">
        		<Setter.Value>
        			<ControlTemplate TargetType="{x:Type GroupBox}">
        				<Grid SnapsToDevicePixels="true">
        					<Grid.ColumnDefinitions>
        						<ColumnDefinition Width="6"/>
        						<ColumnDefinition Width="Auto"/>
        						<ColumnDefinition Width="*"/>
        						<ColumnDefinition Width="6"/>
        					</Grid.ColumnDefinitions>
        					<Grid.RowDefinitions>
        						<RowDefinition Height="Auto"/>
        						<RowDefinition Height="Auto"/>
        						<RowDefinition Height="*"/>
        						<RowDefinition Height="6"/>
        					</Grid.RowDefinitions>
        					<Border BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.ColumnSpan="4" Grid.Column="0" CornerRadius="4" Grid.Row="1" Grid.RowSpan="3"/>
        					<Border x:Name="Header" Grid.Column="1" Padding="3,1,3,0" Grid.Row="0" Grid.RowSpan="2">
        						<ContentPresenter TextBlock.FontWeight="Bold" ContentSource="Header" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
        					</Border>
        					<ContentPresenter Grid.ColumnSpan="2" Grid.Column="1" Margin="{TemplateBinding Padding}" Grid.Row="2" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
        					<Border BorderBrush="White" BorderThickness="{TemplateBinding BorderThickness}" Grid.ColumnSpan="4" CornerRadius="4" Grid.Row="1" Grid.RowSpan="3">
        						<Border.OpacityMask>
        							<MultiBinding ConverterParameter="7" Converter="{StaticResource BorderGapMaskConverter}">
        								<Binding ElementName="Header" Path="ActualWidth"/>
        								<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
        								<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}"/>
        							</MultiBinding>
        						</Border.OpacityMask>
        						<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="3">
        							<Border BorderBrush="White" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2"/>
        						</Border>
        					</Border>
        				</Grid>
        			</ControlTemplate>
        		</Setter.Value>
        	</Setter>
        </Style>
    </UserControl.Resources>
    <Grid VerticalAlignment="Top" Margin="10">
		<Grid.RowDefinitions>
			<RowDefinition Height="25"/>
			<RowDefinition Height="10"/>
			<RowDefinition Height="25"/>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto"/>
			<ColumnDefinition Width="10"/>
			<ColumnDefinition Width="Auto"/>
			<ColumnDefinition/>
		</Grid.ColumnDefinitions>
		<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Année - Mois de réalisation :" VerticalAlignment="Center" FontWeight="Bold" Margin="0"/>
		<StackPanel Grid.Column="2" Orientation="Horizontal" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center">
			<ComboBox HorizontalAlignment="Left" VerticalAlignment="Center" FontWeight="Normal" ItemsSource="{Binding ListeAnneeRealisation}" SelectedItem="{Binding CurrentAnneeRealisation}" Width="53.88"/>
			<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="-" VerticalAlignment="Center" Margin="5,0"/>
			<ComboBox HorizontalAlignment="Left" VerticalAlignment="Center" ItemsSource="{Binding ListeMoisRealisation}" FontWeight="Normal" SelectedItem="{Binding CurrentMoisRealisation}" Width="40.94"/>
		</StackPanel>
		<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" VerticalAlignment="Center" FontWeight="Bold" Margin="0" Grid.Row="2" Visibility="{Binding IsAnneeMoisRealisationValide, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}"><Run Text="Nom :"/></TextBlock>
		<StackPanel Orientation="Horizontal" Margin="0" HorizontalAlignment="Left" VerticalAlignment="Center" Grid.Row="2" Grid.Column="2" Visibility="{Binding IsAnneeMoisRealisationValide, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}"><TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding BaseNomPMT, Mode=OneWay}" VerticalAlignment="Center" Margin="0"/><TextBox TextWrapping="Wrap" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="0" MinWidth="42" Background="{x:Null}" BorderBrush="{x:Null}" Text="{Binding ComplementNomPMT}"/></StackPanel>
		<Border BorderBrush="Black" Grid.ColumnSpan="4" Grid.Row="3" BorderThickness="0" Margin="0,10,0,0" Visibility="{Binding IsAnneeMoisRealisationValide, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}">
			<ContentPresenter Content="{Binding ViewModelRacineInfocentre, Mode=OneWay}"/>
		</Border>
		<Border BorderBrush="Black" Grid.ColumnSpan="4" Grid.Row="4" Visibility="{Binding IsAnneeMoisRealisationValide, Converter={StaticResource BooleanToVisibilityConverter}, Mode=OneWay}" d:LayoutOverrides="GridBox">
			<ContentPresenter Content="{Binding ViewModelRacineParametres, Mode=OneWay}" Margin="0,0,0,10" Visibility="{Binding TestVisibility, Mode=OneWay}"/>
		</Border>
	</Grid>
</UserControl>
